From: Owen W. Taylor Date: Mon, 14 Feb 2011 22:09:04 +0000 (-0500) Subject: workspaceThumbnail: forbid manipulations of removed workspaces X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8945 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=45fe44da85b8fe199d82bf5dd3d12bdc164a81cd;p=gnome-shell.git workspaceThumbnail: forbid manipulations of removed workspaces Don't allow dragging onto a removed workspace or activating it. https://bugzilla.gnome.org/show_bug.cgi?id=642329 --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 6d44e2358..ab9ea9091 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -328,6 +328,9 @@ WorkspaceThumbnail.prototype = { }, _activate : function (clone, time) { + if (this.state > ThumbnailState.NORMAL) + return; + // a click on the already current workspace should go back to the main view if (this.metaWorkspace == global.screen.get_active_workspace()) Main.overview.hide(); @@ -337,6 +340,9 @@ WorkspaceThumbnail.prototype = { // Draggable target interface handleDragOver : function(source, actor, x, y, time) { + if (this.state > ThumbnailState.NORMAL) + return DND.DragMotionResult.CONTINUE; + if (source.realWindow) return DND.DragMotionResult.MOVE_DROP; if (source.shellWorkspaceLaunch) @@ -346,6 +352,9 @@ WorkspaceThumbnail.prototype = { }, acceptDrop : function(source, actor, x, y, time) { + if (this.state > ThumbnailState.NORMAL) + return false; + if (source.realWindow) { let win = source.realWindow; if (this._isMyWindow(win))